<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=GBK"/>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
</head>
<body></body>
<script type="text/javascript">
wx.config({
    debug: false,
    appId: '${requestMap.config_app_id}',
    signature: '${requestMap.config_signature}',
    timestamp: ${requestMap.config_timestamp},
    nonceStr: '${requestMap.config_noncestr}',
    jsApiList: ['chooseWXPay']
});

wx.ready(function () {
    wx.chooseWXPay({
        timestamp: ${requestMap.wxpay_timestamp},
        nonceStr: '${requestMap.wxpay_noncestr}',
        package: '${requestMap.wxpay_package}',
        signType: '${requestMap.wxpay_sign_type}',
        paySign: '${requestMap.wxpay_sign_text}',
        success: function() {
            document.location = "${app_order_return}";
        },
        cancel: function() {
            window.history.back();
        },
        fail:function() {
            document.location = "${app_order_return}";
        }
    });
});
</script>
</html>